Add Hebrew (he) translation for Local Assist and LLM Enhanced blueprints - #135
Open
yosef-chai wants to merge 1 commit into
Open
Add Hebrew (he) translation for Local Assist and LLM Enhanced blueprints#135yosef-chai wants to merge 1 commit into
yosef-chai wants to merge 1 commit into
Conversation
Add:
- Hebrew translation for the Local Assist blueprint
(local-assist-blueprint/mass_assist_blueprint_he.yaml)
- Hebrew translation for the LLM Enhanced blueprint
(llm-enhanced-local-assist-blueprint/mass_llm_enhanced_assist_blueprint_he.yaml)
- README import-table rows for both blueprints
Design notes:
Trigger words
Both blueprints cover idiomatic Hebrew imperative + future-tense verb
forms in both masculine and feminine:
- Play: נגן/נגני/תנגן/תנגני, השמע/השמיעי/תשמיע/תשמיעי
- Put on (colloquial): שים/שימי/תשים/תשימי
- Activate: הפעל/הפעילי/תפעיל/תפעילי
- Listen: האזן/האזיני/תאזין/תאזיני
- Shuffle: ערבב/ערבבי/תערבב/תערבבי (also detects שאפל, אקראי)
Bracketed suffix matching is used where stems share a root, e.g. נגנ[י]
matches both נגן and נגני in a single alternative, following the same
convention used by the official Hebrew sentences in
home-assistant/intents (sentences/he/_common.yaml).
Definite article and prepositions
The definite article ה and prepositions ב/ל/מ/כ/ש are clitics attached
without a space to the following word in Hebrew. Two approaches are
combined for robustness:
1. Every noun alternative lists both the unprefixed and ה-prefixed
forms explicitly (e.g. אלבום|האלבום|תקליט|התקליט), so the trigger
matches regardless of how the STT tokenizes the prefix.
2. The area/player slot value is normalized in the action template
with regex_replace to strip leading ב/ל/מ/כ/ש and optional ה, so
"במטבח" matches an area named "מטבח".
Vocabulary
- Artist: אמן/אמנית/זמר/זמרת/להקה/הרכב (covers both genders + ensembles)
- Track: שיר/רצועה/הלחן/הסינגל
- Album: אלבום/תקליט/דיסק/אוסף/EP
- Radio: תחנת רדיו/רדיו/תחנה/תחנת השידור
- Playlist: פלייליסט/רשימת השמעה (loanword wins in colloquial speech)
- Audiobook: ספר שמע/ספר מוקלט/אודיובוק/אודיו בוק
- "By artist": של (most natural) or מאת
Shuffle detection
The shuffle variable checks for ערבב, תערבב, שאפל, אקראי, or shuffle
in trigger.sentence, so all natural Hebrew shuffle phrasings activate
the shuffle setting on the target player.
LLM Enhanced specifics
- Trigger pattern: same verb list as Local Assist + {query}
- LLM prompt kept in English (best model performance) with added
Hebrew hints: media_type mapping table (שיר->track, אלבום->album, ...),
Israeli artist names in Hebrew (עומר אדם, שלמה ארצי), international
artists in English (Pink Floyd, not פינק פלויד), Israeli radio
stations in Hebrew (גלגלצ, רשת ב, כאן 88)
- media_description prompt instructs the LLM to respond in the input
language so Hebrew requests get Hebrew spoken-back responses
- Radio mode options localized with a translation layer that maps back
to the English values the downstream logic expects
- combine word: וגם (and also)
Tested against
- YAML schema validation (PyYAML + HA !input tag)
- Jinja2 syntax validation of all template expressions
- Hassil syntax conventions (verified against sentences/he/_common.yaml
in home-assistant/intents)
yosef-chai
force-pushed
the
add-hebrew-translation
branch
from
May 30, 2026 20:17
ecb5a66 to
024b160
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Hebrew (עברית) translations for two blueprints, following the existing per-language convention — one
.yamlblueprint per type plus a row in the README import tables:local-assist-blueprint/mass_assist_blueprint_he.yamlllm-enhanced-local-assist-blueprint/mass_llm_enhanced_assist_blueprint_he.yamlThis is net-new Hebrew media-control voice coverage — there are currently no media_player sentences for Hebrew (
he) in home-assistant/intents.Trigger words
Both blueprints cover idiomatic Hebrew imperative + future-tense verb forms in both masculine and feminine:
נגן/נגני/תנגן/תנגני,השמע/השמיעי/תשמיע/תשמיעישים/שימי/תשים/תשימיהפעל/הפעילי/תפעיל/תפעיליהאזן/האזיני/תאזין/תאזיניערבב/ערבבי/תערבב/תערבבי(also detectsשאפל,אקראי)Bracketed suffix matching is used where stems share a root, e.g.
נגנ[י]matches bothנגןandנגניin a single alternative — following the same convention used in the official Hebrew sentences (home-assistant/intents/sentences/he/_common.yaml).Definite article and prepositions
The definite article
הand prepositionsב/ל/מ/כ/שare clitics in Hebrew — attached without a space to the following word. Two approaches are combined for robustness:אלבום|האלבום|תקליט|התקליט), so the trigger matches regardless of how the STT tokenizes the prefix.במטבח(one phonetic word) still matches an area namedמטבחin Home Assistant.Vocabulary
אמן/אמנית/זמר/זמרת/להקה/הרכבשיר/רצועה/הלחן/הסינגלאלבום/תקליט/דיסק/אוסף/EPתחנת רדיו/רדיו/תחנה/תחנת השידורפלייליסט(loanword wins in speech) /רשימת השמעהספר שמע/ספר מוקלט/אודיובוק/אודיו בוקשל(most natural) /מאתShuffle detection
The
shufflevariable checks forערבב,תערבב,שאפל,אקראי, orshuffleintrigger.sentence, so all natural Hebrew shuffle phrasings activate shuffle on the target player.LLM Enhanced specifics
{query}media_typemapping table (שיר→track,אלבום→album,אמן→artist,פלייליסט→playlist,רדיו→radio)עומר אדם,שלמה ארצי); international artists in English (Pink Floyd, notפינק פלויד); Israeli radio stations in Hebrew (גלגלצ,רשת ב,כאן 88)media_descriptionprompt instructs the LLM to respond in the input language so Hebrew requests get Hebrew spoken-back responsesהשתמש בהגדרת הנגן/תמיד/אף פעם, with a translation layer that maps them back to the English values the downstream logic expectsוגםExamples
Validation
!inputtag registered)home-assistant/intents/sentences/he/_common.yaml(נגנ[י]char-level matching,[ה]<name>and[ב]<area>prefix patterns are exactly the conventions used there)Test plan
תנגן את האלבום Greatest Hits של James Taylor במטבחvia Assist and verify the correct album, artist, and area are extractedערבב שירים של עומר אדםand confirm the target player has shuffle enabledתנגן את השיר X במצב רדיוand confirm radio_mode is set onmusic_assistant.play_media